package com.devplatform.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @TableName message
 */
@TableName(value = "message")
@Data
public class Message {
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;//接收者id

    private String title;

    private String content;

    private Integer type;

    private Integer isRead;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long relatedId;

    private String extraData;

    private LocalDateTime createTime;
}